//shoppingcarts.js
//获取应用实例
const app = getApp()

Page({
  data: {
    lo:'https://xiaochengxu.printeasy.top',
    goods:[],
    // 组件所需的参数
    nvabarData: {
      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
      title: '订单详情', //导航栏 中间的标题
    },
    liuyan:'',
    payDate:'',
    sendDate:'',
    // 此页面 页面内容距最顶部的距离
    height: app.globalData.height * 2 + 20,
  },
  onLoad(options) {
    let id = options.id;
    let that = this;
    let url = app.globalData.URL+'goods/commodity/order/'+id;
        let data = {};
        app.wxRequest('GET', url, data, (res) => {
          let goods = res
          let liuyan = goods.buyerMessage
          let payDate = goods.payDate
          let sendDate = goods.sendDate
          if(liuyan!=null){
            that.setData({
              liuyan:liuyan
            })
          }
          if(payDate!=null){
            that.setData({
              payDate:payDate
            })
          }
          if(sendDate!=null){
            that.setData({
              sendDate:sendDate
            })
          }
          that.setData({
            goods:goods
          })
          console.log(goods)
        }, (err) => {
          console.log(err.errMsg)
        })
  },
  mjly:function(e){
    console.log(e.detail.value)
  }
})
